package com.jianyun.jyzs.utils;


public class EmptyHandle {

	public static Integer handleInt(Object param){
		if(param != null){
			if(!String.valueOf(param).trim().equals("null")){
				try {
					return Integer.valueOf(String.valueOf(param));
				} catch (Exception e) {
				}
			}
		}
		return null;
	}
	public static Long handleLong(Object param){
		if(param != null){
			if(!String.valueOf(param).trim().equals("null")){
				try {
					return Long.valueOf(String.valueOf(param));
				} catch (Exception e) {
				}
			}
		}
		return null;
	}
	public static String handleString(Object p){
		if(p != null){
			String param = String.valueOf(p);
			if(!param.trim().equals("null") && !param.trim().equals("")){
				try {
					return String.valueOf(param);
				} catch (Exception e) {
				}
			}
		}
		return null;
	}
	public static Double handleDouble(Object p){
		if(p != null){
			String param = String.valueOf(p);
			if(!param.trim().equals("null") && !param.trim().equals("")){
				try {
					return Double.valueOf(param);
				} catch (Exception e) {
				}
			}
		}
		return null;
	}
}
